<?php
/*
CREATE TABLE `subscribe` (
	`id` INT(10) NOT NULL AUTO_INCREMENT,
	`subscribe_name` VARCHAR(100) NOT NULL,
	`subscribe_email` VARCHAR(100) NOT NULL,
	`status` INT(1) NULL DEFAULT '1',
	PRIMARY KEY (`id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2;
 */
class Subscribe_model extends CI_Model {   

    function __construct() {
         parent::__construct();
	$this->load->database();
    }
    
    function subscribe_insert($data){
//                $data = array(
//                                  'subscribe_name'=>$this->input->post('subscribe_name'),
//                                  'subscribe_email'=>$this->input->post('subscribe_email'),
//                                  'status'=>'1'                                  
//                        );
                $this->db->insert('subscribe',$data);
                return $this->db->insert_id();
          }
}
?>
